package longcaisuyun.longcai.com.net;


import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONException;
import org.json.JSONObject;



/**
 * Created by Administrator on 2016/3/30.
 */
@HttpInlet(Net.GET_CITY)
//@HttpNull(true)
public class GetCityList extends WHAsyPost<GetCityList.Info> {

    //电话号
    public  String mobile = "1";

    public  String username = "";
    //身份证
    public  String cardnumber = "";
    //城市id
    public  String cityid = "1";
    //邀请人手机号码
    public  String mobile2 = "";
    //车型id
    public  String cid = "1";
    //车牌号
    public  String license = "1";


    public String picurl_id = "";
    public  String picurl_driver = "";
    public  String picurl_car = "";
    public  String picurl_license = "";
    public  String picurl_use = "";


    public GetCityList(String mobile,String username, String cardnumber, String cityid, String mobile2, String cid, String license,  String picurl_id, String picurl_driver, String picurl_car, String picurl_license, String picurl_use, AsyCallBack listener) {
        super(listener);
        this.mobile = mobile;
        this.username = username;
        this.cardnumber = cardnumber;
        this.cityid = cityid;
        this.mobile2 = mobile2;
        this.cid = cid;
        this.license = license;
        this.picurl_id=picurl_id;
        this.picurl_driver=picurl_driver;
        this.picurl_car=picurl_car;
        this.picurl_license=picurl_license;
        this.picurl_use=picurl_use;
    }
    @Override
    protected Info parser(JSONObject object) {
            Info info = new Info();
        try {
            info.message= object.getString("message");
            info.id= object.getString("driverid");
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return info;
    }
    protected boolean skipSecret(String key) {

        return key.equals("picurl_use") || key.equals("picurl_license") ||key.equals("picurl_car") ||key.equals("picurl_driver") ||key.equals("picurl_id");
    }
    public static class Info {
        public String message ;
        public String id;
    }
}

